{{define "Title"}}Golang 酷站{{end}}
{{define "ContentWidth"}}10{{end}}
{{define "Breadcrumb"}}
	<ul class="breadcrumb">
		<li><a href="/"><i class="glyphicon glyphicon-home"></i> 首页</a></li>
		<li class="active">酷站</li>
	</ul>
{{end}}
{{define "Content"}}
	<div class="content">
		<h3><small>下面列出了基于Go语言开发的国内外网站或应用,以及和Go相关的网站,包括博客,开源项目等等.如发现不在此列的,请帮忙补充.</small></h3>
	</div>
	{{range .categories}}
		{{$sites := .Sites $.db}}
		{{if len $sites}}
		<div class="content">
			<div class="page-header">
				<h4><small>{{.Name}}</small></h4>
			</div>
			<dl class="site">
			{{range $sites}}
				<dt id="site-{{.Id_.Hex}}">
					<img src="http://statics.dnspod.cn/proxy_favicon/_/favicon?domain={{.TrimUrlHttpPrefix}}"><a href="{{.Url}}" target="_blank">{{.Title}}</a>
					{{if $.username}}
						{{if .CanEdit $.username $.db}}
							<a class="btn btn-xs btn-info pull-right" href="/site/{{.Id_.Hex}}/edit" title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
							<a class="btn btn-xs btn-danger pull-right" href="/site/{{.Id_.Hex}}/delete" title="删除" onclick="javascript:return confirm('确定要删除吗？');"><i class="glyphicon glyphicon-remove"></i></a>
						{{end}}
					{{end}}
				</dt>
				<dd>{{.Markdown}}</dd>
			{{end}}
			</dl>
		</div>
		{{end}}
	{{end}}
{{end}}

{{define "LeftSide"}}{{end}}
{{define "RightSide"}}
<div class="col-md-2 sidebar">
	<a href="/site/new" class="btn btn-info btn-lg btn-block" style="margin-bottom: 20px;">提交网站</a>
</div>
{{end}}
